package net.zdreamer.geracomium.ui.home;

import net.zdreamer.geracomium.adapter.AreaGridViewAdapter;
import net.zdreamer.geracomium.entity.GridImageInfos;
import net.zdreamer.geracomium.ui.BaseActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.GridView;
import android.widget.TextView;

import com.example.geracomium.R;

public class ReserveAreaActivity extends BaseActivity {
	private TextView tv_title;
	private GridView gv_list;
	private AreaGridViewAdapter mAdapter;
	Intent intent;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		init();
	}

	@Override
	protected int getContentView() {
		return R.layout.activity_reserve_area;
	}

	@Override
	protected void init() {
		tv_title = (TextView) findViewById(R.id.title_content);
		gv_list = (GridView) findViewById(R.id.gridview_reserve);
		intent = getIntent();
		int i = intent.getIntExtra("witch", -1);
		initViews(i);
	}

	private void initViews(int i) {
		if (i == 0) {
			tv_title.setText("床位预约区域");
		} else {
			tv_title.setText("床位预约户型");
		}
		GridImageInfos ss = new GridImageInfos();
		mAdapter = new AreaGridViewAdapter(this, ss.images,
				R.layout.item_reverse, i);
		gv_list.setAdapter(mAdapter);
	}

	@Override
	protected void initViews() {

	}

	@Override
	protected void initListener() {

	}
}
